import React, { useEffect, useContext, useState } from 'react';
import AppContext from '../../context';
import ListCell from '../../UIComponent/ListCell.jsx';
import '../../UIComponent/PickerView.css';
import styles from './Setting.scss';
const settingPath = [
    {
        path: '/setting/personnel_setting',
        label: '人员设置',
        icon: 'icon_user_setting'
    }
];
export default function Setting(props) {
    const app = useContext(AppContext);
    function onPushPath(path) {
        props.history.push(path);
    }
    return (
        <div className={styles.container}>
            <div className="weui-cells" style={{ fontSize: 14 }}>
                {settingPath.map(menu => <ListCell
                    key={menu.path}
                    label={<div>
                        <svg className="icon" aria-hidden="true">
                            <use xlinkHref={`#${menu.icon}`}></use>
                        </svg>
                        <span>{menu.label}</span>
                    </div>}
                    onClick={() => onPushPath(menu.path)} />
                )}
            </div>
        </div>
    );
}
